/**
 * Created by coder on 2017/12/29.
 */
import React,{Component} from 'react'
import {Text,View,Button} from 'react-native'
import { StackNavigator } from 'react-navigation'

const HomeScreen = ({navigation}) => (
	<View style={{flex:1,alignItems:'center',justifyContent:'center'}}>
		<Text>Home Screen</Text>
		<Button
			onPress={() => navigation.navigate('Details')}
			title="Go to details"
		/>
	</View>
);

const DetailScreen = () => (
	<View style={{flex:1,alignItems:'center',justifyContent:'center'}}>
		<Text>Details Screen</Text>
	</View>
);

const RootNavigator = StackNavigator({
	Home:{
		screen:HomeScreen,
		navigationOptions:{
			headerTitle:'Home',
		},
	},
	Details:{
		screen:DetailScreen,
		navigationOptions:{
			headerTitle:'Details',
		}
	},
});


export default RootNavigator;
